<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="hmg.common.CommonUtils"%>
<%@ page import="hmg.vo.BoardVO"%>
<%@ page import="java.util.List"%>
<%--
    JSP Name : jspName.jsp
    Description : 설명을 기술합니다.
    author Kim hyung soo
    since 2012. 10. 4.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 10. 4.     Kim hyung soo     최초 생성
--%>
<%
    String compType = CommonUtils.getParameter(request.getParameter("compType"), "0");
    String searchKeyword = CommonUtils.getDecodedParameter(request.getParameter("searchKeyword"), "");

    List<BoardVO> photoList = (List<BoardVO>) request.getAttribute("PhotoList");

    for (int idx = 0; idx < photoList.size(); idx++) {
        BoardVO photo = photoList.get(idx);

        String className = "";
        String liClassName = "";
        String titleStyle = "";
        String thumbnail = photo.getThumbnailImage();

        if (idx == 0 || idx == 4 || idx == 6 || idx == 11 || idx == 12 || idx == 16) {
            className = " wide";
            thumbnail = photo.getThumbnailImage2();
        }

        if ((idx + 1) % 3 == 0)
            liClassName += " last";
%>
                            <li class="photo_layOpen<%= className %><%= liClassName %>" onclick="javascript:fn_view_photo(<%= photo.getListID() %>, <%= photo.getDispNo() %>, <%= compType %>);">
                                <div class="overlay_gallery<%= className %>"><img src="<%= thumbnail %>" alt="" />
                                    <div class="photo_layOver<%= className %>">
                                        <p class="category"><%= photo.getCompName() %></p>
                                        <p class="title" style="width:93%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;"><%= photo.getTitle() %></p>
                                    </div>
                                    <div class="bg"></div>
                                </div>
                            </li>
<%
    }
    if (photoList.size() == 0) {
%>
<script type="text/javascript">
//<![CDATA[
var pageIsEnded = true;
//]]>
</script>
<% } %>